Optimal. Leaf size=138 \[ \frac {\frac {1}{a^3}+\frac {3 a}{b^4}}{d (a \cot (c+d x)+b)}+\frac {\frac {a}{b^3}-\frac {b}{a^3}}{d (a \cot (c+d x)+b)^2}+\frac {\left (a^2+b^2\right )^2}{3 a^3 b^2 d (a \cot (c+d x)+b)^3}-\frac {4 a \log (\tan (c+d x))}{b^5 d}-\frac {4 a \log (a \cot (c+d x)+b)}{b^5 d}+\frac {\tan (c+d x)}{b^4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3088, 894} \[ \frac {\left (a^2+b^2\right )^2}{3 a^3 b^2 d (a \cot (c+d x)+b)^3}+\frac {\frac {1}{a^3}+\frac {3 a}{b^4}}{d (a \cot (c+d x)+b)}+\frac {\frac {a}{b^3}-\frac {b}{a^3}}{d (a \cot (c+d x)+b)^2}-\frac {4 a \log (\tan (c+d x))}{b^5 d}-\frac {4 a \log (a \cot (c+d x)+b)}{b^5 d}+\frac {\tan (c+d x)}{b^4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 894
Rule 3088
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^2 (b+a x)^4} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {1}{b^4 x^2}-\frac {4 a}{b^5 x}+\frac {\left (a^2+b^2\right )^2}{a^2 b^2 (b+a x)^4}+\frac {2 \left (a^4-b^4\right )}{a^2 b^3 (b+a x)^3}+\frac {3 a^4+b^4}{a^2 b^4 (b+a x)^2}+\frac {4 a^2}{b^5 (b+a x)}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {\left (a^2+b^2\right )^2}{3 a^3 b^2 d (b+a \cot (c+d x))^3}+\frac {\frac {a}{b^3}-\frac {b}{a^3}}{d (b+a \cot (c+d x))^2}+\frac {\frac {1}{a^3}+\frac {3 a}{b^4}}{d (b+a \cot (c+d x))}-\frac {4 a \log (b+a \cot (c+d x))}{b^5 d}-\frac {4 a \log (\tan (c+d x))}{b^5 d}+\frac {\tan (c+d x)}{b^4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.17, size = 133, normalized size = 0.96 \[ \frac {-4 \left (a^2+b^2\right ) \left (a^2+3 a b \tan (c+d x)+3 b^2 \tan ^2(c+d x)+b^2\right )+6 a (a+b \tan (c+d x)) \left (a^2-4 a (a+b \tan (c+d x))-2 (a+b \tan (c+d x))^2 \log (a+b \tan (c+d x))+b^2\right )+3 b^4 \sec ^4(c+d x)}{3 b^5 d (a+b \tan (c+d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.72, size = 537, normalized size = 3.89 \[ \frac {3 \, a^{2} b^{4} + 3 \, b^{6} - 4 \, {\left (9 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - 2 \, b^{6}\right )} \cos \left (d x + c\right )^{4} + 6 \, {\left (5 \, a^{4} b^{2} + a^{2} b^{4} - 2 \, b^{6}\right )} \cos \left (d x + c\right )^{2} - 6 \, {\left ({\left (a^{6} - 2 \, a^{4} b^{2} - 3 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{2} + {\left ({\left (3 \, a^{5} b + 2 \, a^{3} b^{3} - a b^{5}\right )} \cos \left (d x + c\right )^{3} + {\left (a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) + 6 \, {\left ({\left (a^{6} - 2 \, a^{4} b^{2} - 3 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{2} + {\left ({\left (3 \, a^{5} b + 2 \, a^{3} b^{3} - a b^{5}\right )} \cos \left (d x + c\right )^{3} + {\left (a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) + 2 \, {\left (2 \, {\left (3 \, a^{5} b - 7 \, a^{3} b^{3} - 6 \, a b^{5}\right )} \cos \left (d x + c\right )^{3} + {\left (11 \, a^{3} b^{3} + 9 \, a b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{3 \, {\left ({\left (a^{5} b^{5} - 2 \, a^{3} b^{7} - 3 \, a b^{9}\right )} d \cos \left (d x + c\right )^{4} + 3 \, {\left (a^{3} b^{7} + a b^{9}\right )} d \cos \left (d x + c\right )^{2} + {\left ({\left (3 \, a^{4} b^{6} + 2 \, a^{2} b^{8} - b^{10}\right )} d \cos \left (d x + c\right )^{3} + {\left (a^{2} b^{8} + b^{10}\right )} d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 4.82, size = 138, normalized size = 1.00 \[ -\frac {\frac {12 \, a \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}} - \frac {3 \, \tan \left (d x + c\right )}{b^{4}} - \frac {22 \, a b^{3} \tan \left (d x + c\right )^{3} + 48 \, a^{2} b^{2} \tan \left (d x + c\right )^{2} - 6 \, b^{4} \tan \left (d x + c\right )^{2} + 36 \, a^{3} b \tan \left (d x + c\right ) - 6 \, a b^{3} \tan \left (d x + c\right ) + 9 \, a^{4} - 2 \, a^{2} b^{2} - b^{4}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{3} b^{5}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.41, size = 188, normalized size = 1.36 \[ \frac {\tan \left (d x +c \right )}{b^{4} d}-\frac {4 a \ln \left (a +b \tan \left (d x +c \right )\right )}{d \,b^{5}}-\frac {6 a^{2}}{d \,b^{5} \left (a +b \tan \left (d x +c \right )\right )}-\frac {2}{d \,b^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {a^{4}}{3 d \,b^{5} \left (a +b \tan \left (d x +c \right )\right )^{3}}-\frac {2 a^{2}}{3 d \,b^{3} \left (a +b \tan \left (d x +c \right )\right )^{3}}-\frac {1}{3 d b \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {2 a^{3}}{d \,b^{5} \left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {2 a}{d \,b^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 144, normalized size = 1.04 \[ -\frac {\frac {13 \, a^{4} + 2 \, a^{2} b^{2} + b^{4} + 6 \, {\left (3 \, a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right )^{2} + 6 \, {\left (5 \, a^{3} b + a b^{3}\right )} \tan \left (d x + c\right )}{b^{8} \tan \left (d x + c\right )^{3} + 3 \, a b^{7} \tan \left (d x + c\right )^{2} + 3 \, a^{2} b^{6} \tan \left (d x + c\right ) + a^{3} b^{5}} + \frac {12 \, a \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{5}} - \frac {3 \, \tan \left (d x + c\right )}{b^{4}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.44, size = 666, normalized size = 4.83 \[ \frac {\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (10\,a^4+b^4\right )}{a^2\,b^3}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (4\,a^4+b^4\right )}{a\,b^4}-\frac {8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (10\,a^4-2\,a^2\,b^2+b^4\right )}{a^2\,b^3}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (10\,a^4+b^4\right )}{a^2\,b^3}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (36\,a^6-88\,a^4\,b^2+a^2\,b^4-4\,b^6\right )}{3\,a^3\,b^4}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (36\,a^6-88\,a^4\,b^2+a^2\,b^4-4\,b^6\right )}{3\,a^3\,b^4}+\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (4\,a^4+b^4\right )}{a\,b^4}}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (12\,a\,b^2-4\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (12\,a\,b^2-4\,a^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (24\,a\,b^2-6\,a^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (18\,a^2\,b-8\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (18\,a^2\,b-8\,b^3\right )+a^3+6\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-6\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\right )}-\frac {8\,a\,\mathrm {atanh}\left (\frac {256\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{256\,a^3-256\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {512\,a^5}{b^2}-\frac {512\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}+\frac {512\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}}-\frac {256\,a^3}{256\,a^3-256\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {512\,a^5}{b^2}-\frac {512\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}+\frac {512\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}}+\frac {512\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{256\,a^3\,b+\frac {512\,a^5}{b}+512\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {512\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b}-256\,a^3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{b^5\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{2}{\left (c + d x \right )}}{\left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{4}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________